home *** CD-ROM | disk | FTP | other *** search
- COMMENT %
- ============================================================================
- Sets the cursor type.
-
- ===========================================================================%
- setCursorType MACRO Start,End
- mov ch,Start ;Cursor start/end lines in cx
- mov cl,End
- mov ah,1 ;Set cursor type function code
- int 10h ;Video I/O interrupt
- ENDM
-
-
-
- COMMENT %
- ============================================================================
- Gets the current cursor type.
-
- ===========================================================================%
- getCursorType MACRO Start,End,Page
- mov ah,3 ;Read cursor posn function code
- IFNB <Page> ;If given display page
- mov bh,Page ;Pass it in bh
- ELSE
- mov bh,0 ;Otherwise use display page zero
- ENDIF
- int 10h ;Read cursor posn
- mov Start,ch ;Retrun cursor start line
- mov End,cl ;Retrun cursor end line
- ENDM
-
-
- COMMENT %
- ============================================================================
- Positions the cursor.
-
- ===========================================================================%
- setCur MACRO Row,Col,Page
- IFNB <Page> ;If given display page
- mov bh,Page ;Pass it in bh
- ELSE
- mov bh,0 ;Otherwise use display page zero
- ENDIF
- IFDIF <Row>,<dh>
- mov dh,Row ;Pass row number in dh
- ENDIF
- IFDIF <Col>,<dl>
- mov dl,Col ;Pass column number in dl
- ENDIF
- mov ah,2 ;Pass set cursor service number in ah
- int 10h
- ENDM
-
-
-
- COMMENT %
- ============================================================================
- Moves the cursor right one column.
-
- ===========================================================================%
- cursorRight MACRO Spaces
- mov ah,3 ;Pass read cursor service number
- int 10h ;Returns cursor position in dx
- IFNB <Spaces>
- add dl,Spaces ;Advance cursor Spaces
- ELSE
- inc dl ;Advance cursor one space
- ENDIF
- mov ah,2 ;Pass set cursor service number in ah
- int 10h ;Advance cursor
- ENDM
-